package com.zm.zmgz.utils;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: cjw
 * @Date: 2020/05/22/15:10
 * @Description:Double类型相关工具方法
 */
public class DoubleUtils {

    public static void main(String[] args) {
        System.err.println(getRoundToTwoDecimalPlaces(123.23523));
    }

    /***
    * @Description: double四舍五入并保留两位小数
    * @Param: 
    * @return: 
    * @Author: cjw
    * @Date: 2020-05-22 15:11:18
    */
    public static double getRoundToTwoDecimalPlaces(double d){
        return (double) Math.round(d * 100) / 100;
    }













}
